package net.funtip.ormgenerator.generator;

public class TypeMapperSimpleImpl implements TypeMapper {

	private String[][] mappedTypes = {
			{"Long", "INTEGER"}, 
			{"java.lang.Long", "INTEGER"},
			{"long", "INTEGER"}, 
			{"Integer", "INTEGER"}, 
			{"java.lang.Integer", "INTEGER"},
			{"int", "INTEGER"},
			{"String", "VARCHAR(255)"}
	};

	/* (non-Javadoc)
	 * @see net.funtip.ormgenerator.generator.TypeMapper#getMappedType(java.lang.String)
	 */
	@Override
	public String getMappedType(String type) {
		for (int i=0; i<mappedTypes.length; i++) {
			if (mappedTypes[i][0].equals(type)) {
				return mappedTypes[i][1];
			}
		}
		return null;
	}
}
